package com.jsz.peini.service.square;

import java.util.LinkedHashMap;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.jsz.peini.bean.square.SquareComment;
import com.jsz.peini.mapper.square.SquareCommentMapper;

@Service
public class SquareCommentService {
	
	@Resource
	private SquareCommentMapper squareCommentMapper;
	
	public List<LinkedHashMap<String,Object>> selectBySquareId(Integer squareInfoId){
		List<LinkedHashMap<String,Object>> squareMap = squareCommentMapper.selectBySquareId(squareInfoId);
		return squareMap;
	}
	
	public int insert(SquareComment squareComment){
		int result = squareCommentMapper.insert(squareComment);
		return result;
	}
	
	public int delete(Integer id){
		int result = squareCommentMapper.delete(id);
		return result;
	}

	public SquareComment selectByPrimaryKey(Integer id) {
		return squareCommentMapper.selectByPrimaryKey(id);
	}

}
